import request from '@/utils/request'

// 查询平台用户列表
export function listHealthUser(query) {
  return request({
    url: '/health/healthUser/list',
    method: 'get',
    params: query
  })
}

// 查询平台用户详细
export function getHealthUser(id) {
  return request({
    url: '/health/healthUser/' + id,
    method: 'get'
  })
}

// 新增平台用户
export function addHealthUser(data) {
  return request({
    url: '/health/healthUser',
    method: 'post',
    data: data
  })
}

// 修改平台用户
export function updateHealthUser(data) {
  return request({
    url: '/health/healthUser',
    method: 'put',
    data: data
  })
}

// 删除平台用户
export function delHealthUser(id) {
  return request({
    url: '/health/healthUser/' + id,
    method: 'delete'
  })
}

// 管理员重置平台用户的密码
export function resetPasswordForHealthUser(id) {
  return request({
    url: `/health/healthUser/reset/${id}`,
    method: 'get',
  })
}
